home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # Handle the mischance that we're extracting onto a System-V style NFS
- # file server. It will allow the installer's tar to chown all files and
- # directories to their original owners, and then be unable to extract them.
-
- PATH=$PATH:/bin:/usr/bin:/usr/ucb:/etc; export PATH
-
- # Repair any damage from previous runs of this pre_install script
- if [ -f $1/Geomview.tar.Z.hide ]; then
- mv $1/Geomview.tar.Z.hide $1/Geomview.tar.Z
- fi
-
- DIR=$2/Geomview.app
- TESTFILE=${DIR}/testfile.$$
- mkdir ${DIR} 2>&-
- touch ${TESTFILE} 2>&-
- chmod 644 ${TESTFILE}
-
- # Can we give away the test file, and if so are we unable to write to it?
-
- if /etc/chown 3579 ${TESTFILE} 2>&- && test ! -w ${TESTFILE}; then
- rm -f ${TESTFILE}
- echo >&2 "\
- You seem to be using a System-V style NFS file server.
- The NeXT Installer can't properly extract packages in this environment,
- so I'll extract them separately. The STOP button will be ineffective.
- arg 1=$1, arg 2=$2, PATH=$PATH"
-
- # Extract the files using gnu tar...
- (cd $2; $1/gnutar -x -v -p -Z -f $1/Geomview.tar.Z )
-
- # Hide the Geomview.tar.Z file so the Installer won't try to do likewise...
- # & create an empty Geomview.tar.Z for the Installer to unpack harmlessly.
- mv $1/Geomview.tar.Z $1/Geomview.tar.Z.hide &&
- compress </dev/null >$1/Geomview.tar.Z || :
-
- # Compressing /dev/null gives nonzero exit status; don't kill the install.
-
- exit 0
- else
- rm -f ${TESTFILE}
- fi
-